<?php
	include "book.php";
	
	class Library
	{
		private $books=array();
		
		function __construct()
		{
			$this->books=array();
		}

		public function addBook($book, $isbn)
		{
			$this->books[$isbn]=$book;
		}
	
		public function getBook($isbn)
		{
			return $this->books[$isbn];		
		}
		
		public function removeBook($isbn)
		{
			unset($this->books[$isbn]);
		}
	}
	
	$library = new Library();
	
	$book = new book("Ad", "Dan Brown");
	
	$book2 = new book("Casual Vacancy","J.K.Rowling");
	
	$library->addBook($book, "333");
	$library->addBook($book2, "555");
	$danBook=$library->getBook("333");
	echo var_dump($library);
	
	$library->removeBook("333");
	echo var_dump($library);
?>